A gas lock may occur when liquid and gas separate in the tubing above an electric submersible pump (ESP) and inside the pump itself. The ESP may be a multistage ESP with multiple ganged pumps powered by one or more motors. In the tubing, the liquid and gas characteristically separate with the gas on top and the liquid on the bottom, effectively forming a plug above the ESP against fluid flow. Inside the pump, by contrast, the situation may be reversed, with the liquid on the top and the gas on the bottom. The liquid level in the pump is based on the amount of fluid in the tubing above the ESP and the pressure that each stage produces at zero flow. The gas in the bottom of the pump is effectively a bubble preventing more fluid from entering the pump.